package com.example.javabasic.thread.classtwo.threadpermessage.demo1;

import java.util.stream.IntStream;

//一个请求  一个线程
public class Test {
    public static void main(String[] args) {
        final MessageHandler handler = new MessageHandler();
        IntStream.rangeClosed(0, 10).forEach(i -> {
            Message message = new Message(String.valueOf(i));
            handler.request(message);
        });
        handler.shutDown();
    }
}
